<template>
	<view class="content">
		<Header>
			学习培训
		</Header>
		<liuyuno-tabs :tabData="tabs" :defaultIndex="defaultIndex" @tabClick='tabClick' />
		<view style="height: calc(100vh - 86px - var(--status-bar-height))">
			<StudyList v-if="defaultIndex == 0"></StudyList>
			<MyStudy v-if="defaultIndex == 1"></MyStudy>
		</view>
	</view>
</template>

<script>
	import Header from '../../components/header.vue'
	import liuyunoTabs from "@/components/liuyuno-tabs/liuyuno-tabs.vue";
	import StudyList from './studyList.vue'
	import MyStudy from './myStudy.vue'
	export default {
		components: {
			Header,
			StudyList,
			MyStudy
		},
		data() {
			return {
				tabs: ['学习培训计划', '我的学习培训'],
				defaultIndex: 0
			}
		},
		onLoad() {

		},
		methods: {
			showSearch() {
				uni.navigateTo({
					url: '/pages/search'
				})
			},
			tabClick(index) {
				this.defaultIndex = index
			}
		}
	}
</script>

<style scoped>
	::v-deep ._tab-box::after {
		position: absolute;
		bottom: 0;
		right: 0;
		left: 0;
		height: 1px;
		content: "";
		transform: scaleY(0.5);
		background-color: #e5e5e5;
	}
	
</style>